<?php
/*
+-----------------------------------------------------------------------------+
| $Id: index.php 2007-05-20 10:03:01Z Bleakwind $
| Index Control
| Copyright (c) 2003-2010 Bleakwind (www.weaverdream.com)
| http://www.weaverdream.com/
| Release under the GPL licenses:
|   http://www.gnu.org/licenses/gpl.html
+-----------------------------------------------------------------------------+
*/

// Safety confirm
define('ENTRY_INDEX', 1);

// Set envionment variables
@set_time_limit(30);
@error_reporting(E_ALL ^ E_NOTICE);
//@error_reporting(E_ERROR | E_WARNING | E_PARSE);
@set_magic_quotes_runtime(0);

// Runtime
include_once './lib/class/bwruntime.class.php';
$bwruntime = new bwruntime();

// Initialize
include_once './source/initialize.php';

// Start the action
if(array_key_exists($sys->get['act'], $CONFIGURE['module'])){
    require_once "source/".$CONFIGURE['module'][$sys->get['act']].".php";
}else{
    require_once "source/point_page.php";
}

// Parse path
require_once "source/parsepath.php";

// Conclude
if( $CONFIGURE['common']['if_output_template'] == "1") {
    if (file_exists($t->template_dir.$template_name)) {
        include_once './source/conclude.php';
    } else {
        $sys->prompt("jump",$CONFIGURE['common']['control_index']."?act=index");
    }
}
?>